package com.app.bitmapmodulelearn.bussiness.compression

import android.graphics.BitmapFactory
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.app.bitmapmodulelearn.R

/**
 *  Create by zhouwd on 2020-01-17
 *  Describe:
 */
class CompressionFragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {

        return inflater.inflate(R.layout.fragment_compression, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        val bitmap = BitmapFactory.decodeResource(context!!.resources, R.drawable.aa)

        view.findViewById<ZoomImageView>(R.id.fragment_compression_ziv).setImageBitmap(bitmap)

    }

}